{include file='header.tpl'}

{if strlen($changed_cvars) gt 0}
<div class="success">
<p><strong>Success!</strong> The specified variable(s) have been changed:</p>
<ul>
    {foreach from=$changed_cvars key=cvar item=value}
        <li>{$cvar} = {$value|escape:'html'}</li>
    {/foreach}
</ul>
</div><br />
{/if}

<ul>
    <li><strong>Server:</strong> <em>{$server_name|escape:'html'}</em> (<a href="paintball2://{$host}:{$port}">{$host}:{$port}</a>)</li>
</ul>

<p>Change the server cvars below. Only filled in values will be changed.</p>

<form action="{$form_action|escape:'html'}" method="post">
    <table border="0" cellspacing="0" cellpadding="0" class="form">
        <col width="1%" />
        {foreach name="fr_user_settings" from=$user_settings key=cvar item=opt}
        <tr{if $smarty.foreach.fr_user_settings.last eq true} class="last"{/if}>
            <th><label for="var_{$cvar}"><a href="http://digitalpaint.therisenrealm.com/reference/commands#{$cvar|escape:'url'}">{$cvar}</a>:</label></th>
            <td>
                {if $opt.type eq 'int' or $opt.type eq 'float'}
                <input type="text" id="var_{$cvar}" name="var_{$cvar}" size="5" />
                {elseif $opt.type eq 'string'}
                <input type="text" id="var_{$cvar}" name="var_{$cvar}" size="30" />
                {elseif $opt.type eq 'bool'}
                <select id="var_{$cvar}" name="var_{$cvar}">
                    <option value="">&nbsp;</option>
                    <option value="true">true</option>
                    <option value="false">false</option>
                </select>
                {/if}
            </td>
        </tr>
        {/foreach}
    </table>
    
    <p><strong>Warning:</strong> All changes will be announced publicly to all players on the server.</p>
    
    <p><input type="submit" value="Commit Changes" /> &nbsp; <a href="index.php">Lease another server</a></p>
</form>

{include file='footer.tpl'}